package com.xiashuxia.orgims.action;

import java.io.File;
import java.sql.Date;
import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ExceptionMapping;
import org.apache.struts2.convention.annotation.ExceptionMappings;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;

import com.opensymphony.xwork2.ActionSupport;
import com.xiashuxia.orgims.model.Department;
import com.xiashuxia.orgims.service.ActivityService;
import com.xiashuxia.orgims.service.DepartmentService;

@Scope("session")
@ParentPackage("struts-default")
@Namespace("/activity")
@ExceptionMappings({ @ExceptionMapping(exception = "java.lange.RuntimeException", result = "error") })
public class ActivityAction extends ActionSupport{
	
	@Action(value="activityApply", results = { @Result(name="", location=""), 
			@Result(name="", location="")})
	public String activityApply() {
		
		
		return null;
	}
	
	
	private String name;
	
	private String description;
	
	private Department deparment;
	
	private Date date;
	
	private File upload;
	
	private String uploadContentType;
	
	private String uploadFileName;
	
	private String savePath;
	
	private List<Member> members;
	
	private List<MaterialBorrow> materialBorrows;
	
	
	/*
	 * 自动注入activityService对象
	 */
	@Autowired
	ActivityService activityService;
}

class Member {}
class Material {}
class Activity {}
class MaterialBorrow {}